package com.coderjacky.search.controller;

import com.coderjacky.common.core.web.domain.AjaxResult;
import com.coderjacky.search.domain.SpuInfo;
import com.coderjacky.search.service.SpuInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName SpuInfoController
 * @Description 描述
 * @Author GYW
 * @Date 2024-12-18 22:09
 */
@RestController
@RequestMapping("spuinfo")
public class SpuInfoController {

    @Autowired
    private SpuInfoService spuInfoService;


    /**
     * 修改状态
     */
    @PostMapping("updateStatus")
    public AjaxResult updateStatus(@RequestBody SpuInfo spuInfo){
        return spuInfoService.updateStatus(spuInfo);
    }

    /**
     * 查询表数据
     */
    @PostMapping("selectList")
    public AjaxResult selectList(){
        return AjaxResult.success(spuInfoService.selectList());
    }



}
